/*
 * @Description: 定义部门管理字段
 * @Author: zhihong deng
 * @Date: 2021-09-20 13:02:17
 * @LastEditors: zhihong deng
 * @LastEditTime: 2021-09-20 13:11:04
 */
const mongoose = require('mongoose')
const deptSchema = mongoose.Schema({
  parentId: [mongoose.Types.ObjectId],
  deptName: String,
  userId: Number,
  userName: String,
  userEmail: String,
  createTime: {
    type: Date,
    default: Date.now()
  },
  updateTime: {
    type: Date,
    default: Date.now()
  }
})
module.exports = mongoose.model('depts', deptSchema, 'depts')